Version 3.5 performance#22
Merged
Merged
Conversation
- feat: propagate tokens through chained dispatches unless overridden - feat: add .DoNotAwait() for fire‑and‑yield sub‑dispatches - feat: expose active cancellation token via dispatcher.CancelToken - feat: allow effects to stop early using dispatcher.IsCancellationRequested - feat: include anti‑duplication cancellations in IsCancellationRequested - perf: speed up reducer resolution by indexing by action/state - fix: ensure await propagates through entire dispatch pipeline including nested calls
- Remove bool as first param for DispatchAsync t execute safe pipeline - Added fluent api AsSafe() and AsUnSafe() to mark pipeline as safe or not.
Deploying statepulse-net with
|
| Latest commit: |
9cfe904
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://1189f390.statepulse-net.pages.dev |
| Branch Preview URL: | https://version-3-5-performance.statepulse-net.pages.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
v3.0.0
BREAKING CHANGES
IDispatchTracker<TAction>is not longer taking a TAction and the service is no longer register per action but instead as a scope serviceIDispatchTracker.IDispatcher.Prepare<TAction>().DispatchAsync(CancellationToken ct = default)no longer returnsGuidas it was unused artifacts of a idea of a system for cancellations.IDispatcher.Prepare<TAction>().DispatchAsync(bool asSafe = false, CancellationToken ct = default)no longer takesboolas first param instead use fluent api.AsSafe()to achieve the same result.WARNING CHANGES
IDispatcherMiddleware.OnDispatchFailure(Exception exception, object action);renamed arguments toIDispatcherMiddleware.OnDispatchFailure(Exception ex, object action);which could trigger compiler warnings.New Features
DispatchAsync(false,new CT);..DoNotAwait()is now available, design for effect sub-dispatches when specific dispatch should not be awaited in case the origin call awaits the full pipeline... some tasks should not be awaited? that's your method.dispatcher.CancelTokenwhich is default or correspond to upper chain origin.dispatcher.IsCancellationRequested.dispatcher.IsCancellationRequestedinclude now if the anti-duplication chain that was cancelled but slipped through the cracks if any you can now catch it in the effects.dispatcer.AsSafe()replaces the first paramIDispatcher.Prepare<TAction>().DispatchAsync(bool asSafe = false, CancellationToken ct = default)to execute the context with race condition resistance.dispatcer.AsUnSafe()turn off the the rc resistance, it is useful to disconnect a usually safe flow to prevent cancellation.Performance
Major Fixes